package com.sqfw.project.zj.service.impl;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
import java.util.stream.Collectors;
import java.util.stream.DoubleStream;

import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.ObjectUtil;
import com.github.pagehelper.PageInfo;
import com.sqfw.common.constant.HttpStatus;
import com.sqfw.common.exception.base.BaseException;
import com.sqfw.common.utils.DateUtils;
import com.sqfw.common.utils.StringUtils;
import com.sqfw.framework.web.page.TableDataInfo;
import com.sqfw.project.system.domain.SysDept;
import com.sqfw.project.system.domain.SysUser;
import com.sqfw.project.system.mapper.SysDeptMapper;
import com.sqfw.project.system.mapper.SysUserMapper;
import com.sqfw.project.wp.domain.WpBackInfo;
import com.sqfw.project.wp.domain.WpHandleLog;
import com.sqfw.project.wp.domain.WpInfo;
import com.sqfw.project.wp.mapper.WpBackInfoMapper;
import com.sqfw.project.wp.mapper.WpHandleLogMapper;
import com.sqfw.project.wp.mapper.WpInfoMapper;
import com.sqfw.project.wp.utils.ListUtils;
import com.sqfw.project.wpReport.domain.WpInfoDetail;
import com.sqfw.project.zj.domain.*;
import com.sqfw.project.zj.mapper.ZjRecordMapper;
import com.sqfw.project.zj.mapper.ZjSoundCaseMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.list.AbstractSerializableListDecorator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import com.sqfw.project.zj.mapper.ZjRecordScoreMapper;
import com.sqfw.project.zj.service.IZjRecordScoreService;

/**
 * 录音质检评分Service业务层处理
 *
 * @author ruoyi
 * @date 2023-07-17
 */
@Slf4j
@Service
public class ZjRecordScoreServiceImpl implements IZjRecordScoreService {
    @Autowired
    private ZjRecordScoreMapper zjRecordScoreMapper;

    @Autowired
    private SysUserMapper sysUserMapper;

    @Autowired
    private WpInfoMapper wpInfoMapper;

    @Autowired
    private WpBackInfoMapper wpBackInfoMapper;

    @Autowired
    private WpHandleLogMapper wpHandleLogMapper;

    @Autowired
    private ZjRecordMapper zjRecordMapper;

    @Autowired
    private SysDeptMapper sysDeptMapper;

    @Autowired
    private ZjSoundCaseMapper zjSoundCaseMapper;

    @Autowired
    @Qualifier(value = "asyncServiceExecutor")
    private Executor executor;

    /**
     * 查询录音质检评分
     *
     * @param scid 录音质检评分主键
     * @return 录音质检评分
     */
    @Override
    public ZjRecordScore selectZjRecordScoreByScid(Long scid) {
        return zjRecordScoreMapper.selectZjRecordScoreByScid(scid);
    }

    /**
     * 查询录音质检评分列表
     *
     * @param zjRecordScore 录音质检评分
     * @return 录音质检评分
     */
    @Override
    public List<ZjRecordScore> selectZjRecordScoreList(ZjRecordScore zjRecordScore) {
        return zjRecordScoreMapper.selectZjRecordScoreList(zjRecordScore);
    }

    /**
     * 查询话务员列表
     *
     * @return 话务员列表
     */
    @Override
    public List<SysUser> getSeatList() {
        return zjRecordScoreMapper.getSeatList();
    }

    /**
     * 查询服务监听评分列表
     *
     * @param zjServiceMoniScoreExcelVo 服务监听评分
     * @return 服务监听评分集合
     */
    public TableDataInfo selectZjServiceMoniScoreExcelVoList(ZjServiceMoniScoreExcelVo zjServiceMoniScoreExcelVo) {
        //  List<ZjServiceMoniScoreExcelVo> list = zjRecordScoreMapper.selectZjServiceMoniScoreExcelVoList(zjServiceMoniScoreExcelVo);

        List<ZjRecord> list = zjRecordMapper.selectZjServiceMoniScoreExcelVoListNew(zjServiceMoniScoreExcelVo);

        TableDataInfo tableDataInfo = new TableDataInfo();
        tableDataInfo.setTotal(new PageInfo(list).getTotal());

        List<ZjServiceMoniScoreExcelVo> excelVos = new ArrayList<>();

        // 依次获取评分项集合
        List<ZjRecordScore> zjRecordScores;
        for (ZjRecord zjRecord : list) {

            ZjServiceMoniScoreExcelVo excelVo = new ZjServiceMoniScoreExcelVo();

            excelVo.setAgentId(zjRecord.getAgentId());
            excelVo.setAgentName(zjRecord.getAgentName());
            excelVo.setWpDate(zjRecord.getScoreDate());
            excelVo.setRecordSeconds(zjRecord.getRecordSeconds());
            //质检点评
            excelVo.setZjComment(zjRecord.getExistingIssues());
            excelVo.setScore(zjRecord.getScore());
            if (StringUtils.isNotEmpty(zjRecord.getWpid())) {
                WpInfo wpInfo = wpInfoMapper.selectWpInfoByWpId(zjRecord.getWpid());
                if (wpInfo != null) {
                    excelVo.setTelNum(wpInfo.getPhoneno());
                    excelVo.setCallContent(wpInfo.getSummary());
                }

              /*  ZjSoundCase zjSoundCase = zjSoundCaseMapper.selectZjSoundCaseByWpid(zjRecord.getWpid());
                if (zjSoundCase != null) {

                }*/

            }

            if (zjRecord.getDeptId() != null) {
                SysDept sysDept = sysDeptMapper.selectDeptById(zjRecord.getDeptId());
                excelVo.setGroupName(sysDept.getDeptName());
            }

            zjRecordScores = zjRecordScoreMapper.getZjRecordScoresByRecordId(zjRecord.getRecordId());
            excelVo.setZjRecordScores(zjRecordScores);
            // 从列表中解析出来
            for (ZjRecordScore zjRecordScore : zjRecordScores) {
                switch (zjRecordScore.getItemId()) {
                    case "fwgffwyy":
                        excelVo.setFwyyScore(zjRecordScore.getScore()); // 服务用语得分
                        break;
                    case "fwgfgtnl":
                        excelVo.setGtnlScore(zjRecordScore.getScore()); // 沟通能力
                        break;
                    case "fwgfhjsy":
                        excelVo.setHjsyScore(zjRecordScore.getScore()); // 话机使用
                        break;
                    case "ywnl":
                        excelVo.setYwnlScore(zjRecordScore.getScore()); // 业务能力
                        break;
                    case "gdgf":
                        excelVo.setGdgfScore(zjRecordScore.getScore()); // 工单规范
                        break;
                    case "gdgf1":
                        excelVo.setGdgf1Score(zjRecordScore.getScore()); // 工单规范
                        break;
                    case "gdgf2":
                        excelVo.setGdgf2Score(zjRecordScore.getScore()); // 工单规范
                        break;
                    case "jfx":
                        excelVo.setFjxScore(zjRecordScore.getScore()); // 附加项
                        break;
                }
            }
            if (StringUtils.isEmpty(excelVo.getGdgfScore())){
                excelVo.setGdgfScore("0");
            }
            if (StringUtils.isEmpty(excelVo.getGdgf1Score())){
                excelVo.setGdgf1Score("0");
            }
            if (StringUtils.isEmpty(excelVo.getGdgf2Score())){
                excelVo.setGdgf2Score("0");
            }
            int score =  Integer.parseInt(excelVo.getGdgfScore())+Integer.parseInt(excelVo.getGdgf1Score())+Integer.parseInt(excelVo.getGdgf2Score());
            excelVo.setGdgfScore(String.valueOf(score));
            excelVos.add(excelVo);

        }

        tableDataInfo.setRows(excelVos);
        tableDataInfo.setCode(HttpStatus.SUCCESS);
        tableDataInfo.setMsg("查询成功");
        return tableDataInfo;
    }

    /**
     * 查询质检组绩效表列表
     *
     * @param zjPerformance 质检组绩效
     * @return 质检组绩效表列表
     */
    public TableDataInfo getPerformanceList(ZjPerformance zjPerformance) {

        SysUser sysUser = new SysUser();
       // sysUser.setRoleKey("seats");
        sysUser.setCode(zjPerformance.getAgentId());

        List<Long> deptIds = new ArrayList<>();
        //回访组
        deptIds.add(107L);
        deptIds.add(103L);
        sysUser.setDeptIds(deptIds);

        List<SysUser> sysUsers = sysUserMapper.selectUserByDeptsAndCode(sysUser);

        //  List<SysUser> sysUsers = sysUserMapper.selectZXUserList(sysUser);

        TableDataInfo tableDataInfo = new TableDataInfo();
        tableDataInfo.setTotal(new PageInfo(sysUsers).getTotal());
        tableDataInfo.setMsg("查询成功");
        tableDataInfo.setCode(HttpStatus.SUCCESS);
        if (sysUsers.size() == 0) {

            tableDataInfo.setRows(sysUsers);
            return tableDataInfo;
        }

        //创建异步阻塞任务集合
        List<CompletableFuture<ZjPerformance>> futureList = new ArrayList<>();
        //所有坐席人员
        for (SysUser user : sysUsers) {

            futureList.add(CompletableFuture.supplyAsync(() -> getZjPerformanceFutule(zjPerformance,user), executor));


        }

        //等待所有任务执行完成
        CompletableFuture.allOf(futureList.toArray(new CompletableFuture[0]));
        List<ZjPerformance> collect = futureList.stream().map(CompletableFuture::join).collect(Collectors.toList());
        List<ZjPerformance> zjPerformances = collect.stream().sorted(Comparator.comparing(ZjPerformance::getSumScore).reversed()).collect(Collectors.toList());
        tableDataInfo.setRows(zjPerformances);

        return tableDataInfo;
    }

    private ZjPerformance getZjPerformanceFutule(ZjPerformance zjPerformance,SysUser user) {

        WpInfo wpInfo = new WpInfo();
        wpInfo.setBegainTime(zjPerformance.getBegainTime());
        wpInfo.setEndTime(zjPerformance.getEndTime());
        wpInfo.setEndState("自办");
        wpInfo.setScidType("12345工单");

        ZjRecord zjRecord = new ZjRecord();
        zjRecord.setBegainTime(zjPerformance.getBegainTime());
        zjRecord.setEndTime(zjPerformance.getEndTime());

        ZjPerformance performance = new ZjPerformance();
        performance.setAgentId(user.getCode());
        performance.setAgentName(user.getNickName());

        //质检录音
        zjRecord.setAgentId(user.getCode());
        zjRecord.setZjStatus("已质检");
        //查询录音得分
        List<ZjRecord> zjRecords = zjRecordMapper.selectZjRecordListOnScore(zjRecord);

        if (zjRecords.size() > 0) {
            int size = zjRecords.size();

            double totalScore = zjRecords.stream().map(ZjRecord::getScore)
                    .flatMapToDouble(num -> DoubleStream.of(Double.parseDouble(num)))
                    .reduce(Double::sum)
                    .orElse(0);


            double recordScore = totalScore / size;

            String format = String.format("%.2f", recordScore);

            String recordPerScore = String.format("%.2f", recordScore * 0.50);

            //录音平均得分
            performance.setRecordScore(format);
            //录音占比得分
            performance.setRecordPerScore(recordPerScore);
        }

        //质检自办件
        wpInfo.setSender(user.getCode());
        List<WpInfo> wpInfos = wpInfoMapper.selectWpInfoList(wpInfo);


        if (wpInfos.size() > 0) {
            List<String> wpids = wpInfos.stream().map(WpInfo::getWpid).collect(Collectors.toList());

            List<List<String>> wpidsList = ListUtils.split(wpids, 1000);
            int size = 0;
            SysUser userCon = new SysUser();
            List<String> roleKeys = new ArrayList<>();
            roleKeys.add("zj_hf");
            userCon.setRoleKeys(roleKeys);
            //质检和回访人员
            List<SysUser> users = sysUserMapper.selectUserByRolesAndCode(userCon);
            List<String> collect = users.stream().map(SysUser::getCode).collect(Collectors.toList());

            for (List<String> wpidList : wpidsList) {
                /*WpHandleLog wpHandleLog = new WpHandleLog();
                wpHandleLog.setWpids(wpidList);*/

                WpHandleLog wpHandleLogCon = new WpHandleLog();
                wpHandleLogCon.setBegainTime(zjPerformance.getBegainTime());
                wpHandleLogCon.setEndTime(zjPerformance.getEndTime());
                wpHandleLogCon.setScidType("12345工单");
                wpHandleLogCon.setEndState("自办");
                wpHandleLogCon.setWpids(wpidList);
                wpHandleLogCon.setSender(user.getCode());
                wpHandleLogCon.setOperators(collect);
                List<ZjSelfHandleStatDto> statDtos = wpHandleLogMapper.selectWpidsByScidType(wpHandleLogCon);

                size = size+statDtos.size();
            }


            double point = (double) ((wpids.size()-size) *100)/ (double) wpids.size();

            String selfManageScore = String.format("%.2f", point);

            String selfManagePerScore = String.format("%.2f", point * 0.40);
            //质检得分
            performance.setSelfManageScore(selfManageScore);
            //质检占比得分
            performance.setSelfManagePerScore(selfManagePerScore);
        }

        if (StringUtils.isNotEmpty(performance.getRecordScore())) {
            //默认10分
            performance.setSoundCaseScore("10.00");
        }

        if (StringUtils.isNotEmpty(performance.getSelfManageScore())) {
            //默认10分
            performance.setReturnVisitSatisfyScore("0.00");
        }

        double recordPerScoreCon = getScore(performance.getRecordPerScore());

        double selfManagePerScoreCon = getScore(performance.getSelfManagePerScore());

        double soundCaseScoreCon = getScore(performance.getSoundCaseScore());

        double returnVisitSatisfyScore = getScore(performance.getReturnVisitSatisfyScore());
        //总分
        double sumScore = recordPerScoreCon + selfManagePerScoreCon + soundCaseScoreCon + returnVisitSatisfyScore;

        String sumScoreCon = String.format("%.2f", sumScore);
        performance.setSumScore(sumScoreCon);
        return performance;
    }


    private Double getScore(String score) {
        if (StringUtils.isEmpty(score)) {
            return 0.00;
        } else {
            return Double.valueOf(score);
        }
    }

    /**
     * 查询质检组绩效表统计表列表
     *
     * @param zjPerformanceStat 质检组绩效
     * @return 质检组绩效表统计表列表
     */
    public TableDataInfo getPerformanceStatList(ZjPerformanceStat zjPerformanceStat) {


        List<ZjRecordScoreQuaryVO> quaryVOS = zjRecordMapper.countQcNum(zjPerformanceStat);

        TableDataInfo tableDataInfo = new TableDataInfo();
        tableDataInfo.setTotal(new PageInfo(quaryVOS).getTotal());
        List<ZjPerformanceStat> zjPerformanceStats = new ArrayList<>();
        for (ZjRecordScoreQuaryVO quaryVO : quaryVOS) {

            ZjPerformanceStat stat = new ZjPerformanceStat();


            if (StringUtils.isNotEmpty(quaryVO.getAgentId())) {
                SysUser sysUser = sysUserMapper.selectUserByCode(quaryVO.getAgentId());
                if (sysUser != null) {
                    stat.setAgentName(sysUser.getNickName());
                    stat.setAgentId(quaryVO.getAgentId());
                }

            }
            if (quaryVO.getAvgScore() != null) {
                String str = String.format("%.2f", quaryVO.getAvgScore());
                stat.setCurrAvgScore(str);
            }
            stat.setCurrMonRecordCount(quaryVO.getCountNum());
            if (StringUtils.isNotEmpty(quaryVO.getQcNum())) {
                SysUser sysUser = sysUserMapper.selectUserByCode(quaryVO.getQcNum());
                if (sysUser != null) {
                    stat.setQcName(sysUser.getNickName());
                }

            }

            zjPerformanceStats.add(stat);
        }
        tableDataInfo.setRows(zjPerformanceStats);
        tableDataInfo.setMsg("查询成功！");
        tableDataInfo.setCode(HttpStatus.SUCCESS);

        return tableDataInfo;
    }

    /**
     * 查询自办件统计表列表
     *
     * @param zjSelfHandleStat 自办件统计表
     * @return 自办件统计表列表
     */
    public TableDataInfo getSelfHandleStatList(ZjSelfHandleStat zjSelfHandleStat) {


        List<ZjSelfHandleStat> statList = new ArrayList<>();
        SysUser sysUser = new SysUser();
        sysUser.setCode(zjSelfHandleStat.getAgentId());

        List<Long> deptIds = new ArrayList<>();
        //回访组
        deptIds.add(107L);
        deptIds.add(103L);
        sysUser.setDeptIds(deptIds);
        List<SysUser> sysUsers = sysUserMapper.selectUserByDeptsAndCode(sysUser);

        //查询自办件退单的人员

        SysUser userCon = new SysUser();
        List<String> roleKeys = new ArrayList<>();
        roleKeys.add("zj_hf");
        userCon.setRoleKeys(roleKeys);
        //质检和回访人员
        List<SysUser> users = sysUserMapper.selectUserByRolesAndCode(userCon);
        TableDataInfo tableDataInfo = new TableDataInfo();
        tableDataInfo.setTotal(new PageInfo(sysUsers).getTotal());

        if (sysUsers.size() == 0) {
            tableDataInfo.setMsg("查询成功");
            tableDataInfo.setCode(HttpStatus.SUCCESS);
            tableDataInfo.setRows(statList);
            return tableDataInfo;
        }
        WpHandleLog wpHandleLog = new WpHandleLog();
        wpHandleLog.setBegainTime(zjSelfHandleStat.getBegainTime());
        wpHandleLog.setEndTime(zjSelfHandleStat.getEndTime());
        wpHandleLog.setScidType("12345工单");
        wpHandleLog.setEndState("自办");
        List<ZjSelfHandleStatDto> statDtos = wpHandleLogMapper.selectWpidsByScidType(wpHandleLog);

        // 使用并发
        CountDownLatch countDownLatch = ThreadUtil.newCountDownLatch(sysUsers.size());

        for (SysUser user : sysUsers) {
            ThreadUtil.execute(() -> {
                try {
                    WpInfo wpInfo = new WpInfo();
                    wpInfo.setBegainTime(zjSelfHandleStat.getBegainTime());
                    wpInfo.setEndTime(zjSelfHandleStat.getEndTime());
                    wpInfo.setScidType("12345工单");
                    ZjSelfHandleStat stat = new ZjSelfHandleStat();
                    stat.setAgentId(user.getCode());
                    stat.setAgentName(user.getNickName());
                    // 用户的工号
                    wpInfo.setSender(user.getCode());
                    Integer wpSumCount = wpInfoMapper.selectWpInfoListByScidType(wpInfo);
                    //12345工单总数
                    stat.setWpSumCount(wpSumCount);

                    wpInfo.setEndState("自办");
                    //自办件
                    Integer wpSelfSumCount = wpInfoMapper.selectWpInfoListByScidType(wpInfo);
                    wpInfo.setEndState(null);
                    stat.setWpSelfSumCount(wpSelfSumCount);

                    for (int i = 0; i < users.size(); i++) {
                        String nickName = users.get(i).getNickName();
                        String userCode = user.getCode();
                        String operator = users.get(i).getCode();
                        //   wpHandleLog.setOperator(users.get(i).getCode());
                        //wpHandleLog.setSender(user.getCode());

                        //wpidsCon.stream().filter(wpidCon->wpidCon.equals())
                        //  List<String> wpids = wpHandleLogMapper.selectWpidsByScidType(wpHandleLog);
                        long sum = statDtos.stream()
                                .filter(statDto -> StringUtils.isNotEmpty(statDto.getOperator())
                                        && userCode.equals(statDto.getSender()) && operator.equals(statDto.getOperator()))
                                .count();
                        int count = (int) sum;

                        switch (i) {
                            case 0:
                                stat.setReturnA(count);
                                stat.setReturnCountA(count + "(" + nickName + ")");
                                break;
                            case 1:
                                stat.setReturnB(count);
                                stat.setReturnCountB(count + "(" + nickName + ")");
                                break;
                            case 2:
                                stat.setReturnC(count);
                                stat.setReturnCountC(count + "(" + nickName + ")");
                                break;
                            case 3:
                                stat.setReturnD(count);
                                stat.setReturnCountD(count + "(" + nickName + ")");
                                break;
                        }

                    }
                    if (stat.getReturnA()==null){
                        stat.setReturnA(0);
                    }
                    if (stat.getReturnB()==null){
                        stat.setReturnB(0);
                    }
                    if (stat.getReturnC()==null){
                        stat.setReturnC(0);
                    }
                    if (stat.getReturnD()==null){
                        stat.setReturnD(0);
                    }
                    //退单总数
                    stat.setReturnCountSum((ObjectUtil.isNotEmpty(stat.getReturnA())?stat.getReturnA():0) + (ObjectUtil.isNotEmpty(stat.getReturnB())?stat.getReturnB():0) + (ObjectUtil.isNotEmpty(stat.getReturnC())?stat.getReturnC():0) + (ObjectUtil.isNotEmpty(stat.getReturnD())?stat.getReturnD():0));
                    String returnPoint = getReturnPoint(wpSelfSumCount, stat.getReturnCountSum());
                    stat.setSelfPerRet(returnPoint + "%");
                    statList.add(stat);
                }catch (BaseException e) {
                    log.info("坐席-自办件数据统计表报错:{},{}",user.getCode(), e.toString());
                } finally {
                    log.info("坐席-自办件数据统计表线程开启:{}",user.getCode());
                    //调用线程计数器-1
                    countDownLatch.countDown();
                }
            });
        }
        //唤醒主线程
        try {
            countDownLatch.await();
        } catch (InterruptedException e) {
            log.info("多线程统计报错：{}", e.toString());
        }

        List<ZjSelfHandleStat> collect = statList.stream().sorted(Comparator.comparing(ZjSelfHandleStat::getWpSumCount).reversed()).collect(Collectors.toList());
        tableDataInfo.setMsg("查询成功");
        tableDataInfo.setCode(HttpStatus.SUCCESS);
        tableDataInfo.setRows(collect);
        return tableDataInfo;
    }

    /**
     * 接收工单分值
     *
     * @param wpSelfSumCount
     * @param returnCountSum
     * @return
     */
    private String getReturnPoint(int wpSelfSumCount, int returnCountSum) {
        if (wpSelfSumCount == 0) {
            return "0.00";
        }
        double v = ((double) returnCountSum / (double) wpSelfSumCount) * 100;
        return String.format("%.2f", v);
    }


    /**
     * 根据录音id查询各项评分
     *
     * @param recordId 录音id
     * @return 录音质检评分集合
     */
    @Override
    public List<ZjRecordScore> selectZjRecordScoreListByRecordId(String recordId) {
        List<ZjRecordScore> zjRecordScores = zjRecordScoreMapper.selectZjRecordScoreListByRecordId(recordId);
        // 没打过分，各项默认得分为最高分，打过了展示上次打的分
        for (ZjRecordScore zjRecordScore : zjRecordScores) {
            if (!"加分项".equals(zjRecordScore.getItemClass1()) && StringUtils.isEmpty(zjRecordScore.getScore())) {
                String[] ss = zjRecordScore.getScoreSelects().split(",");
                zjRecordScore.setScore(ss[ss.length - 1]);
            }
        }
        return zjRecordScores;
    }

    /**
     * 新增录音质检评分
     *
     * @param zjRecordScore 录音质检评分
     * @return 结果
     */
    @Override
    public int insertZjRecordScore(ZjRecordScore zjRecordScore) {
        zjRecordScore.setCreateTime(DateUtils.getNowDate());
        return zjRecordScoreMapper.insertZjRecordScore(zjRecordScore);
    }

    /**
     * 修改录音质检评分
     *
     * @param zjRecordScore 录音质检评分
     * @return 结果
     */
    @Override
    public int updateZjRecordScore(ZjRecordScore zjRecordScore) {
        zjRecordScore.setUpdateTime(DateUtils.getNowDate());
        return zjRecordScoreMapper.updateZjRecordScore(zjRecordScore);
    }

    /**
     * 批量删除录音质检评分
     *
     * @param scids 需要删除的录音质检评分主键
     * @return 结果
     */
    @Override
    public int deleteZjRecordScoreByScids(Long[] scids) {
        return zjRecordScoreMapper.deleteZjRecordScoreByScids(scids);
    }

    /**
     * 删除录音质检评分信息
     *
     * @param scid 录音质检评分主键
     * @return 结果
     */
    @Override
    public int deleteZjRecordScoreByScid(Long scid) {
        return zjRecordScoreMapper.deleteZjRecordScoreByScid(scid);
    }
}
